<?php /* Smarty version 2.6.18, created on 2016-12-09 08:55:30
         compiled from resource/resource.fav.list.tpl.php */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.header.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.left.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
   <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
          <section class="col-lg-2 connectedSortable" style=" padding-right:0px;">
            <div>
                <a href="index.php?a=resource.list" class="btn btn-default">教学资源</a>
                <a href="index.php?a=resource.favlist" class="btn btn-success">我的收藏</a>
            </div>
          <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "resource/resource.fav.left.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
          
        </section>
        <!--树状图结束-->
        <section class="col-lg-10 connectedSortable">
         <div class="box box-default box-solid">
             <form name="myform" action="" method="get">	
                <div class="box-header with-border">
                    <span class="fa fa-pagelines" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">我的收藏</p>
					
                </div>
                <div class="box-body">	
                    <div class="form-group" style="margin-bottom:5px;">
                       <a href="index.php?a=resource.favlist" class="btn btn-success btn-sm">全部分类</a>
					 <?php $_from = $this->_tpl_vars['part_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                       <a href="index.php?a=resource.favlist&part_id=<?php echo $this->_tpl_vars['value']['part_id']; ?>
" <?php if ($this->_tpl_vars['value']['part_id'] == $this->_tpl_vars['part_id']): ?>class="stuffs"<?php else: ?>class="stuff"<?php endif; ?>><?php echo $this->_tpl_vars['value']['part_name']; ?>
</a>
                     <?php endforeach; endif; unset($_from); ?>
                    </div>
                    <div class="form-group" style="margin-bottom:20px;">
                       <a href="index.php?a=resource.favlist" class="btn btn-success btn-sm">全部格式</a>
                       <a href="index.php?a=resource.favlist&file_type=doc&grade_id=<?php echo $this->_tpl_vars['grade_id']; ?>
&subject_id=<?php echo $this->_tpl_vars['subject_id']; ?>
" class="stuff">DOC</a>
                       <a href="index.php?a=resource.favlist&file_type=xls&grade_id=<?php echo $this->_tpl_vars['grade_id']; ?>
&subject_id=<?php echo $this->_tpl_vars['subject_id']; ?>
" class="stuff">XLS</a>
                       <a href="index.php?a=resource.favlist&file_type=ppt&grade_id=<?php echo $this->_tpl_vars['grade_id']; ?>
&subject_id=<?php echo $this->_tpl_vars['subject_id']; ?>
" class="stuff">PPT</a>
                       <a href="index.php?a=resource.favlist&file_type=pdf&grade_id=<?php echo $this->_tpl_vars['grade_id']; ?>
&subject_id=<?php echo $this->_tpl_vars['subject_id']; ?>
" class="stuff">PDF</a>
                       <a href="index.php?a=resource.favlist&file_type=txt&grade_id=<?php echo $this->_tpl_vars['grade_id']; ?>
&subject_id=<?php echo $this->_tpl_vars['subject_id']; ?>
" class="stuff">TXT</a>
                       <a href="index.php?a=resource.favlist&file_type=mp4&grade_id=<?php echo $this->_tpl_vars['grade_id']; ?>
&subject_id=<?php echo $this->_tpl_vars['subject_id']; ?>
" class="stuff">视频</a>
                       <a href="index.php?a=resource.favlist&file_type=qi&grade_id=<?php echo $this->_tpl_vars['grade_id']; ?>
&subject_id=<?php echo $this->_tpl_vars['subject_id']; ?>
" class="stuff">其他</a>
                    </div>
                    <div class="col-md-3 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; margin:0;">
							   标题：
						  </label>
						  <div class="input-group col-md-9 col-xs-12">
							   <input type="text" class="form-control" name="resource_title" value="<?php echo $this->_tpl_vars['resource_title']; ?>
">
						  </div> 
				    </div>
					<div class="col-md-2 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-6 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; margin:0;">
							   上传人：
						  </label>
						  <div class="input-group col-md-6 col-xs-12">
							    <input type="text" class="form-control" name="staff_names" value="<?php echo $this->_tpl_vars['staff_names']; ?>
">
						  </div> 
				    </div>
					<div class="col-md-7 col-xs-12 form-group" style="padding:0;">
						  <label  class="col-sm-2 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; ">
							   时间：
						  </label>
						  <div class="input-group col-md-4" style="float:left;">
							   <input type="text" class="form-control" value="<?php echo $this->_tpl_vars['from']; ?>
" id="from" name="from">
							     <div class="input-group-addon" style="padding:6px 7px;">
									<i class="fa fa-calendar"></i>
								 </div>
						  </div>
						  <span style="float:left;">  ~  </span >
						  <div class="input-group col-md-4" style="float:left; margin-right:8px;">
							   <input type="text" class="form-control" value="<?php echo $this->_tpl_vars['to']; ?>
" id="to" name="to">
							      <div class="input-group-addon" style="padding:6px 7px;">
									 <i class="fa fa-calendar"></i>
								 </div>
						  </div>
					   <input type="hidden" name="grade_id" value="<?php echo $this->_tpl_vars['grade_id']; ?>
">
					   <input type="hidden" name="subject_id" value="<?php echo $this->_tpl_vars['subject_id']; ?>
">
				       <input type="hidden" name="a" value="resource.favlist">
					   <button type="submit" class="btn btn-warning btn-sm">查 询</button>
					</div>
					<div style="clear:both; height:10px;"></div>
                     <table class="table table-bordered table-striped"  id="mytable">
                                <thead>
                                    <tr style="background-color:#fcb53f;">
                                        <td>标题</td>
                                        <td>分类</td>
                                        <td>格式</td>
                                        <td>上传人</td>
                                        <td>大小
                                           <i class="fa fa-sort-amount-asc"></i><i class="fa fa-sort-amount-desc"></i>
                                         </td>
                                        <td>上传时间</td>
                                         
                                        <td width="160">操作</td>
                                    </tr>	
                                </thead>
                                <tbody>
								<?php $_from = $this->_tpl_vars['resource_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                    <tr>
                                        <td><?php echo $this->_tpl_vars['value']['resource_title']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['part_name']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['file_type']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['staff_name']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['file_size']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['create_time']; ?>
</td>
                                        
										<td>
                                            <a href="index.php?a=resource.details&resource_id=<?php echo $this->_tpl_vars['value']['resource_id']; ?>
&grade_id=<?php echo $this->_tpl_vars['grade_id']; ?>
&subject_id=<?php echo $this->_tpl_vars['subject_id']; ?>
&resource_type=shouchang" class="btn btn-success btn-xs" title="查看"><i class="fa fa-search"></i></a>
                                            <a href="index.php?a=resource.output&resource_file=<?php echo $this->_tpl_vars['value']['resource_file']; ?>
&resource_id=<?php echo $this->_tpl_vars['value']['resource_id']; ?>
" class="btn btn-primary btn-xs" title="下载"><i class="fa fa-download"></i></a>
                                            <a  href="index.php?a=resource.favdel&fav_id=<?php echo $this->_tpl_vars['value']['fav']['fav_id']; ?>
" class="btn btn-warning btn-xs" title="取消收藏"><i class="fa fa-star"></i></a>
                                            <?php if ($this->_tpl_vars['user_auth']['user_id'] == $this->_tpl_vars['value']['user_id']): ?>
                                            <a href="index.php?a=resource.update&resource_id=<?php echo $this->_tpl_vars['value']['resource_id']; ?>
&grade_id=<?php echo $this->_tpl_vars['grade_id']; ?>
&subject_id=<?php echo $this->_tpl_vars['subject_id']; ?>
" class="btn btn-info btn-xs" title="修改"><i class="fa fa-edit"></i></a>
                                            <?php endif; ?>

                                            <?php if ($this->_tpl_vars['user_auth']['user_id'] == $this->_tpl_vars['value']['user_id']): ?>
                                            <a href="index.php?a=resource.del&resource_id=<?php echo $this->_tpl_vars['value']['resource_id']; ?>
&grade_id=<?php echo $this->_tpl_vars['grade_id']; ?>
&subject_id=<?php echo $this->_tpl_vars['subject_id']; ?>
" class="btn btn-danger btn-xs" onclick="if(confirm('警告！确认删除信息?')==false)return false;" title="删除"><i class="fa fa-trash"></i></a>
                                            <?php endif; ?>
                                        </td>
                                     
                                    </tr>	
								<?php endforeach; endif; unset($_from); ?> 
                            </tbody>
                        </table>
				   </div><!--box-body -->
                   <div class="box-footer">
                      <?php echo $this->_tpl_vars['page']; ?>

                   </div>
               </form>
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
 <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.footer.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<script>
  $(function() {
    $( "#from" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#to" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#to" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#from" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
  </script>
 
 